using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.S_PayInfoTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HLShop_PayInfoTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HLShop_PayInfoTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HLShop_PayInfo";
			dataTableMapping.ColumnMappings.Add("PaymentID", "PaymentID");
			dataTableMapping.ColumnMappings.Add("UserName", "UserName");
			dataTableMapping.ColumnMappings.Add("PaymentNum", "PaymentNum");
			dataTableMapping.ColumnMappings.Add("eBankInfo", "eBankInfo");
			dataTableMapping.ColumnMappings.Add("MoneyPay", "MoneyPay");
			dataTableMapping.ColumnMappings.Add("MoneyTrue", "MoneyTrue");
			dataTableMapping.ColumnMappings.Add("PayTime", "PayTime");
			dataTableMapping.ColumnMappings.Add("Remark", "Remark");
			dataTableMapping.ColumnMappings.Add("OrderFormNum", "OrderFormNum");
			dataTableMapping.ColumnMappings.Add("eBankID", "eBankID");
			dataTableMapping.ColumnMappings.Add("Status", "Status");
			dataTableMapping.ColumnMappings.Add("SalerID", "SalerID");
			dataTableMapping.ColumnMappings.Add("UserID", "UserID");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HLShop_PayInfo] WHERE (([PaymentID] = @Original_PaymentID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_PaymentID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "PaymentID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HLShop_PayInfo] ([UserName], [UserID], [OrderFormNum], [PaymentNum], [eBankID], [eBankInfo], [MoneyPay], [MoneyTrue], [PayTime], [Status], [Remark], [SalerID]) VALUES (@UserName, @UserID, @OrderFormNum, @PaymentNum, @eBankID, @eBankInfo, @MoneyPay, @MoneyTrue, @PayTime, @Status, @Remark, @SalerID)";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UserName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "UserName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@OrderFormNum", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "OrderFormNum", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@PaymentNum", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "PaymentNum", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@eBankID", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "eBankID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@eBankInfo", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "eBankInfo", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@MoneyPay", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 2, "MoneyPay", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@MoneyTrue", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 2, "MoneyTrue", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@PayTime", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "PayTime", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Status", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Status", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Remark", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "Remark", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@SalerID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "SalerID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HLShop_PayInfo] SET [UserName] = @UserName, [UserID] = @UserID, [OrderFormNum] = @OrderFormNum, [PaymentNum] = @PaymentNum, [eBankID] = @eBankID, [eBankInfo] = @eBankInfo, [MoneyPay] = @MoneyPay, [MoneyTrue] = @MoneyTrue, [PayTime] = @PayTime, [Status] = @Status, [Remark] = @Remark, [SalerID] = @SalerID WHERE (([PaymentID] = @Original_PaymentID))";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UserName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "UserName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@OrderFormNum", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "OrderFormNum", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@PaymentNum", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "PaymentNum", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@eBankID", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "eBankID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@eBankInfo", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "eBankInfo", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@MoneyPay", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 2, "MoneyPay", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@MoneyTrue", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 2, "MoneyTrue", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@PayTime", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "PayTime", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Status", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Status", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Remark", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "Remark", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@SalerID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "SalerID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_PaymentID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "PaymentID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[5];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT     PaymentID, UserName, UserID, OrderFormNum, PaymentNum, eBankID, eBankInfo, MoneyPay, MoneyTrue, PayTime, Status, Remark, SalerID\r\nFROM         HLShop_PayInfo";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "SELECT     MoneyPay, MoneyTrue, OrderFormNum, PayTime, PaymentID, PaymentNum, Remark, SalerID, Status, UserName, eBankID, eBankInfo, UserID\r\nFROM         HLShop_PayInfo\r\nWHERE     (OrderFormNum = @orderformnum)";
			this._commandCollection[1].CommandType = CommandType.Text;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@orderformnum", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, "OrderFormNum", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "SELECT     MoneyPay, MoneyTrue, OrderFormNum, PayTime, PaymentID, PaymentNum, Remark, SalerID, Status, UserName, eBankID, eBankInfo, UserID\r\nFROM         HLShop_PayInfo\r\nWHERE     (UserName = @UserName)";
			this._commandCollection[2].CommandType = CommandType.Text;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@UserName", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "UserName", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "PR_GetPayInfoList";
			this._commandCollection[3].CommandType = CommandType.StoredProcedure;
			this._commandCollection[3].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@eBankID", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@UserName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@SalerID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@BenginTime", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@EndTime", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@Status", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@eBankInfo", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4] = new SqlCommand();
			this._commandCollection[4].Connection = this.Connection;
			this._commandCollection[4].CommandText = "SELECT     MoneyPay, MoneyTrue, OrderFormNum, PayTime, PaymentID, PaymentNum, Remark, SalerID, Status, UserName, eBankID, eBankInfo, UserID\r\nFROM         HLShop_PayInfo\r\nWHERE     (PaymentID = @PaymentID)";
			this._commandCollection[4].CommandType = CommandType.Text;
			this._commandCollection[4].Parameters.Add(new SqlParameter("@PaymentID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "PaymentID", DataRowVersion.Current, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayInfo.HLShop_PayInfoDataTable GetAllPayInfo()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			S_PayInfo.HLShop_PayInfoDataTable hLShop_PayInfoDataTable = new S_PayInfo.HLShop_PayInfoDataTable();
			this.Adapter.Fill(hLShop_PayInfoDataTable);
			return hLShop_PayInfoDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayInfo.HLShop_PayInfoDataTable GetPayInfobyOrderFormNum(string orderformnum)
		{
			this.Adapter.SelectCommand = this.CommandCollection[1];
			if (orderformnum == null)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = orderformnum;
			}
			S_PayInfo.HLShop_PayInfoDataTable hLShop_PayInfoDataTable = new S_PayInfo.HLShop_PayInfoDataTable();
			this.Adapter.Fill(hLShop_PayInfoDataTable);
			return hLShop_PayInfoDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayInfo.HLShop_PayInfoDataTable GetPayInfoByUserName(string UserName)
		{
			this.Adapter.SelectCommand = this.CommandCollection[2];
			if (UserName == null)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = UserName;
			}
			S_PayInfo.HLShop_PayInfoDataTable hLShop_PayInfoDataTable = new S_PayInfo.HLShop_PayInfoDataTable();
			this.Adapter.Fill(hLShop_PayInfoDataTable);
			return hLShop_PayInfoDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayInfo.HLShop_PayInfoDataTable GetPayInfoList(string eBankID, string UserName, int? SalerID, string BenginTime, string EndTime, string Status, string eBankInfo)
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			if (eBankID == null)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = eBankID;
			}
			if (UserName == null)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = UserName;
			}
			if (SalerID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[3].Value = SalerID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (BenginTime == null)
			{
				this.Adapter.SelectCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[4].Value = BenginTime;
			}
			if (EndTime == null)
			{
				this.Adapter.SelectCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[5].Value = EndTime;
			}
			if (Status == null)
			{
				this.Adapter.SelectCommand.Parameters[6].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[6].Value = Status;
			}
			if (eBankInfo == null)
			{
				this.Adapter.SelectCommand.Parameters[7].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[7].Value = eBankInfo;
			}
			S_PayInfo.HLShop_PayInfoDataTable hLShop_PayInfoDataTable = new S_PayInfo.HLShop_PayInfoDataTable();
			this.Adapter.Fill(hLShop_PayInfoDataTable);
			return hLShop_PayInfoDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayInfo.HLShop_PayInfoDataTable GetSinglePayInfoByID(int PaymentID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[4];
			this.Adapter.SelectCommand.Parameters[0].Value = PaymentID;
			S_PayInfo.HLShop_PayInfoDataTable hLShop_PayInfoDataTable = new S_PayInfo.HLShop_PayInfoDataTable();
			this.Adapter.Fill(hLShop_PayInfoDataTable);
			return hLShop_PayInfoDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_PayInfo.HLShop_PayInfoDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_PayInfo dataSet)
		{
			return this.Adapter.Update(dataSet, "HLShop_PayInfo");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[DataObjectMethod(DataObjectMethodType.Delete, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Delete(int Original_PaymentID)
		{
			this.Adapter.DeleteCommand.Parameters[0].Value = Original_PaymentID;
			ConnectionState state = this.Adapter.DeleteCommand.Connection.State;
			if ((this.Adapter.DeleteCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.DeleteCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.DeleteCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.DeleteCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Insert, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Insert(string UserName, int? UserID, string OrderFormNum, string PaymentNum, string eBankID, string eBankInfo, decimal? MoneyPay, decimal? MoneyTrue, System.DateTime? PayTime, string Status, string Remark, int? SalerID)
		{
			if (UserName == null)
			{
				this.Adapter.InsertCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[0].Value = UserName;
			}
			if (UserID.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[1].Value = UserID.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (OrderFormNum == null)
			{
				this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[2].Value = OrderFormNum;
			}
			if (PaymentNum == null)
			{
				this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[3].Value = PaymentNum;
			}
			if (eBankID == null)
			{
				this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[4].Value = eBankID;
			}
			if (eBankInfo == null)
			{
				this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[5].Value = eBankInfo;
			}
			if (MoneyPay.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[6].Value = MoneyPay.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
			}
			if (MoneyTrue.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[7].Value = MoneyTrue.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value;
			}
			if (PayTime.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[8].Value = PayTime.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value;
			}
			if (Status == null)
			{
				this.Adapter.InsertCommand.Parameters[9].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[9].Value = Status;
			}
			if (Remark == null)
			{
				this.Adapter.InsertCommand.Parameters[10].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[10].Value = Remark;
			}
			if (SalerID.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[11].Value = SalerID.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[11].Value = System.DBNull.Value;
			}
			ConnectionState state = this.Adapter.InsertCommand.Connection.State;
			if ((this.Adapter.InsertCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.InsertCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.InsertCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.InsertCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(string UserName, int? UserID, string OrderFormNum, string PaymentNum, string eBankID, string eBankInfo, decimal? MoneyPay, decimal? MoneyTrue, System.DateTime? PayTime, string Status, string Remark, int? SalerID, int Original_PaymentID)
		{
			if (UserName == null)
			{
				this.Adapter.UpdateCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[0].Value = UserName;
			}
			if (UserID.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[1].Value = UserID.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (OrderFormNum == null)
			{
				this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[2].Value = OrderFormNum;
			}
			if (PaymentNum == null)
			{
				this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[3].Value = PaymentNum;
			}
			if (eBankID == null)
			{
				this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[4].Value = eBankID;
			}
			if (eBankInfo == null)
			{
				this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[5].Value = eBankInfo;
			}
			if (MoneyPay.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[6].Value = MoneyPay.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
			}
			if (MoneyTrue.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[7].Value = MoneyTrue.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
			}
			if (PayTime.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[8].Value = PayTime.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
			}
			if (Status == null)
			{
				this.Adapter.UpdateCommand.Parameters[9].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[9].Value = Status;
			}
			if (Remark == null)
			{
				this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[10].Value = Remark;
			}
			if (SalerID.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[11].Value = SalerID.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[11].Value = System.DBNull.Value;
			}
			this.Adapter.UpdateCommand.Parameters[12].Value = Original_PaymentID;
			ConnectionState state = this.Adapter.UpdateCommand.Connection.State;
			if ((this.Adapter.UpdateCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.UpdateCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.UpdateCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.UpdateCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
